#ifndef TRUNNER_H
#define TRUNNER_H

#include "node.h"
#include "channel.h"

#include "ip/fabrics.h"

typedef struct NodeTRunnerParam
{
    int num_of_main_memory;
    int multiplexer;
} NodeTRunnerParam;

class NodeTRunner : public Node
{
public:
    int const_multiplexer;
    int const_num_of_main_memory;
    bool reg_is_running;
    TranOp reg_nano_op;
    int reg_len;
    int reg_src_addr;
    int reg_dst_addr;
    ChannelTranOpFabricReceiver * port_nano_op_receiver;
    List<ChannelLoadReqFabricSender *> port_memory_ports;

    NodeTRunner(Node *parent, NodeTRunnerParam params);
    NodeTaskList tasks() const override;

    void task_fetch_op();
    void task_dispatch_execution();
};

#endif // TRUNNER_H